Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: if-else statement code #806

Closed
wants to merge 8 commits into from
Closed

refactor: if-else statement code #806

wants to merge 8 commits into from

Conversation

parasss19
Copy link
Contributor

@parasss19 parasss19 commented Oct 4, 2023

Description

Changes proposed in this pull request:

  • When using nested if statements, it can be difficult to keep track of the logic and understand the flow of the code. Using else if makes the code more concise and easier to follow.

  • fixed

Screenshot 2023-10-04 120148

Related issue(s)
fixes #786

@parasss19
Copy link
Contributor Author

hey @derberg Please review it
Also provide labels like hacktoberfest2023, hacktoberfest-accepted on issues and my pr so that it would be accepted in hacktoberfest

@parasss19 parasss19 changed the title fix: if-else statement code refactor: if-else statement code Oct 4, 2023
@parasss19
Copy link
Contributor Author

@derberg Please review it now

@parasss19 parasss19 requested a review from derberg October 5, 2023 18:26
@derberg
Copy link
Member

derberg commented Oct 7, 2023

ups, this is causing another code smells, sonad do not like nested ternary. Please bring your if-s back

@derberg
Copy link
Member

derberg commented Oct 11, 2023

@parasss19 lemme know if you need help

@sonarcloud
Copy link

sonarcloud bot commented Oct 12, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@parasss19 parasss19 closed this by deleting the head repository Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'If' statement should not be the only statement in 'else' block
2 participants